% File R/myBam.R
\name{em.scanBam}
\alias{em.scanBam}
\title{Parallel version of scanBam}
\description{
   \code{param}....
}
\usage{
em.scanBam(file, query, index=file, seqs=NULL, ...)
}
\arguments{
  \item{file}{The character(1) file name of the `BAM'
    file to be processed.}
  \item{index}{The character(1) name of the index file of the 'BAM' file
    being processed; this is given _without_ the '.bai'
    extension.}
  \item{query}{}
  \item{seqs}{The character() reference (‘targets’) names where the
    count will be performed. By default  all targets in the BAM header
    are used and each target is processed in parallel.}
}
\seealso{
  \code{\link{Rsamtools}}.
}
\examples{
library(emBAM)

bam.file <- system.file("extdata", "toy.bam", package="emBAM")
query <- em.query("Alignments",what=c("qname","rname","mrnm"),where=list("spliced"))
r<-em.scanBam(bam.file,query)

query2 <- em.query("Alignments",what=c("rname"),count="rname")
r2<-em.scanBam(bam.file,query)

query3 <- em.query("Alignments",what=c("rname"),count=c("distinct","rname"))
r3<-em.scanBam(bam.file,query)

}
\keyword{file}